POV-Ray : Newsgroups : povray.newusers : Need hepl with vector math : Re: Need hepl with vector math Server Time
31 Jul 2024 00:31:26 EDT (-0400)
  Re: Need hepl with vector math  
From: Pyry
Date: 22 Apr 2003 04:45:04
Message: <web.3ea500e1700599c11b82ee40@news.povray.org>
Will W wrote:
>Is there a function "magicnormal" such that if A, B, C are points,
>magicnormal(A, B, C) will return the normal vector to the plane defined by
>A, B, and C? I have looked through the POV sections on functions and macros
>that return vectors and I didn't see anything, but maybe I'm not looking in
>the right place. It seems to me POV must be doing a lot of this sort of
>calculation during rendering.
>
>If there is no such built-in function, I would appreciate any thoughts on
>how to do this efficiently.
>
>
>Background (in case anyone is interested): I'm building a CSG object within
>a macro and need to carve out a concavity in one of its "faces". Points A,
>B, and C are dependent on the values fed to the macro, and I also expect
>their orientation to change when I start tweaking things upstream. About all
>I can be sure of is that the sphere I'll use to carve the face will lie on
>the line that is normal to the center point of the face.
>
> Any thoughts appreciated.
>
>
>--
>Will Woodhull
>Thornhenge, SW Oregon, USA
>willl.at.thornhenge.net
>

Here's a thought (ie. not tested idea).
try
vnormalize(vcross(B-A,C-A))


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.